<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{ $console_host }}/css/unicorn.main.css" />
    <link rel="stylesheet" href="{{ $console_host }}/css/unicorn.grey.css" class="skin-color" />
    <link href="css/app.css" rel="stylesheet">
    <title>魔方互动</title>
    <script>
        window.Laravel = {!! json_encode(['csrfToken' => csrf_token()]) !!};
    </script>
</head>
<body>
<div id="frame">
    <header id="J-header"></header>
    <div id="J-lefter"></div>
    <div id="main">
        <div id="app"></div>
    </div>
</div>
    <script src="js/app.js"></script>
<script>
    $(function () {
        let document_height = $(document).height();
        let document_width = $(document).width();
        let main_height = document_height - 52;
        let main_width = document_width - 220;
        $('#frame').css('height', main_height + 'px');
        $('#J-lefter').css('height', main_height + 'px');
        $('#main').css('height', main_height + 'px').css('width', main_width + 'px');

        $.ajax({
            type: 'GET',
            url: '{{ $console_host }}/public/header',
            dataType: 'jsonp',
            jsonp: 'backHeader',
            timeout: 5000,
            data: 'productId=579fe8571f2ee2236549c849e11251fa'
        }).done(function (data) {
            if (data.code == 200) {
                $('#J-header').append(data.params);
            }
        });

        $.ajax({
            type: 'GET',
            url: '{{ $console_host }}/public/lefter',
            dataType: 'jsonp',
            jsonp: 'backLefter',
            timeout: 5000,
            data: 'productId=579fe8571f2ee2236549c849e11251fa'
        }).done(function (data) {
            if (data.code == 200) {
                $('#J-lefter').append(data.params);
            }
        }).fail(function (xhr, status) {
            console.log(status);
        });
    });
</script>
</body>
</html>